<?php
namespace App\Http\Controllers\Admin;
use App\Exceptions\ExceptionSms;
use App\Services\Common\AdminService;

/**
 * 登录
 * Class LoginController
 * @package App\Http\Controllers\Admin
 */
class LoginController extends CommonController
{
    // 主页
    public function index()
    {
        return view('admin.login');
    }

    // 登录
    public function login()
    {
        $userName = $this->input('user_name') ?? "";
        $passWord = $this->input('pass_word') ?? "";

        AdminService::login($userName, $passWord);

        return ExceptionSms::returnSuccess();
    }

    // 注销
    public function logout()
    {

    }
}
